﻿''' <summary>
''' A control which contains a key/value pair.
''' </summary>
''' <remarks></remarks>
Public Class KeyValuePair

    Private _KeyPairString As String = String.Empty

    Private _Key As String = String.Empty
    Private _Value As String = String.Empty

    Public Property Key() As String
        Get
            Return _Key
        End Get
        Set(ByVal value As String)
            _Key = value
        End Set
    End Property

    Public Property Value() As String
        Get
            Return _Value
        End Get
        Set(ByVal value As String)
            _Value = value
        End Set
    End Property

    Sub New(ByVal KeyPairString As String)
        _KeyPairString = KeyPairString

        Dim _KeyPairStringExploded As String() = KeyPairString.Split("=")

        _Key = _KeyPairStringExploded(0)
        _Value = _KeyPairStringExploded(1)
    End Sub

    Public Shadows Function toString() As String
        Return _Key & "=" & _Value
    End Function

End Class
